﻿<local:DocumentBase x:Class="WPFExcelReport.JLTRP02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"                     
                    FontSize="16"
                    Loaded="Window_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="105">
    <local:DocumentBase.Resources>
        <ucd:PNumConverter  x:Key="pnum"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="5*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2">
            <WrapPanel Height="34">
               <Label Content="机台号："    Width="70" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtMACHINE" Width="54" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="4" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="任务书："    Width="70" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCO" Width="143" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />

                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="96" Panel.ZIndex="9"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="100" Panel.ZIndex="10"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
            
        </StackPanel>
        <DataGrid Grid.Row="1" Margin="0,1,0,0"    
                  FontSize="14"
                              CanUserReorderColumns="True"  
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding}" x:Name="MasterDg" >
            <DataGrid.Columns>
                <!--MACHINE	FROMDATE	FROMTIME	ARTICLE	QTY BEAM	ORD-->
                <DataGridTextColumn Header="机台号" Binding="{Binding MACHINE}" Width="Auto"/>
                <DataGridTextColumn Header="上机日期" Binding="{Binding FROMDATE}" Width="Auto"/>
                <DataGridTextColumn Header="上机时间" Binding="{Binding FROMTIME}" Width="Auto"/>
                <DataGridTextColumn Header="花型号" Binding="{Binding ARTICLE}" Width="Auto"/>
                <DataGridTextColumn Header="轴长" Binding="{Binding QTY}" Width="Auto"/>
                <DataGridTextColumn Header="轴号" Binding="{Binding BEAM}" Width="Auto"/>
                <DataGridTextColumn Header="上机单" Binding="{Binding ORD}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >        
    </Grid>
</local:DocumentBase>
